package com.jt.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;


/**
 * @author jt
 * @date 2024/8/3 12:29
 */
@TableName("logs")
@Data
@ApiModel
public class Logs {

    @TableId(type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "车牌号")
    private String carNo;

    //提交日期
    @DateTimeFormat(pattern = "yyyy-MM-dd") //入参
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "提交日期")
    private Date commitDate;

    //工地名称
    @ApiModelProperty(value = "工地名称")
    private String siteName;

    @NotEmpty
    @ApiModelProperty(value = "操作")
    private String operation;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "类型集合")
    @TableField(exist = false)
    private List<LogsItem> logsItem;

}
